package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Property entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PROPERTY")
public class Property implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -2415093686410564493L;

    // Fields
    private Long id;
    private String name;
    private Long dataTypeId;
    private String dataUnit;
    private Long resType;
    private Long resId;
    private String code;
    private Integer store;
    private Integer display;
    private Integer isCalc;
    private String calcExpr;
    private String desc;
    private String format;

    // Constructors

    /** default constructor */
    public Property() {
    }

    /** minimal constructor */
    public Property(Long id, Integer store) {
        this.id = id;
        this.store = store;
    }

    /** full constructor */
    public Property(Long id, String name, Long dataTypeId, String dataUnit, Long resType, Long resId, String code, Integer store, Integer display, Integer isCalc, String calcExpr, String desc, String format) {
        this.id = id;
        this.name = name;
        this.dataTypeId = dataTypeId;
        this.dataUnit = dataUnit;
        this.resType = resType;
        this.resId = resId;
        this.code = code;
        this.store = store;
        this.display = display;
        this.isCalc = isCalc;
        this.calcExpr = calcExpr;
        this.desc = desc;
        this.format = format;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "PROPERTY_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "DATA_TYPE_ID", precision = 18, scale = 0)
    public Long getDataTypeId() {
        return this.dataTypeId;
    }

    public void setDataTypeId(Long dataTypeId) {
        this.dataTypeId = dataTypeId;
    }

    @Column(name = "DATA_UNIT", length = 32)
    public String getDataUnit() {
        return this.dataUnit;
    }

    public void setDataUnit(String dataUnit) {
        this.dataUnit = dataUnit;
    }

    @Column(name = "RES_TYPE", precision = 18, scale = 0)
    public Long getResType() {
        return this.resType;
    }

    public void setResType(Long resType) {
        this.resType = resType;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "CODE", length = 128)
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Column(name = "STORE", nullable = false, precision = 9, scale = 0)
    public Integer getStore() {
        return this.store;
    }

    public void setStore(Integer store) {
        this.store = store;
    }

    @Column(name = "DISPLAY", precision = 9, scale = 0)
    public Integer getDisplay() {
        return this.display;
    }

    public void setDisplay(Integer display) {
        this.display = display;
    }

    @Column(name = "IS_CALC", precision = 1, scale = 0)
    public Integer getIsCalc() {
        return this.isCalc;
    }

    public void setIsCalc(Integer isCalc) {
        this.isCalc = isCalc;
    }

    @Column(name = "CALC_EXPR", length = 2048)
    public String getCalcExpr() {
        return this.calcExpr;
    }

    public void setCalcExpr(String calcExpr) {
        this.calcExpr = calcExpr;
    }

    @Column(name = "DESC_", length = 2048)
    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Column(name = "FORMAT", length = 1024)
    public String getFormat() {
        return this.format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    @Override
    public String toString() {
        return "Property [id=" + id + ", name=" + name + ", dataTypeId=" + dataTypeId + ", dataUnit=" + dataUnit + ", resType=" + resType + ", resId=" + resId + ", code=" + code + ", store=" + store + ", display=" + display + ", isCalc=" + isCalc + ", calcExpr=" + calcExpr + ", desc=" + desc + ", format=" + format + "]";
    }

}